home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
gfx
/
conv
/
iff2source.zoo
/
Iff2Source
/
Iff2Src.doc
< prev
next >
Wrap
Text File
|
1990-12-04
|
9KB
|
185 lines
==============================================================================
Iff 2 Source V1.0
© J.Tyberghein Mon Oct 8 09:02:11 1990
==============================================================================
Preface
-------
This utility converts IFF ILBM or ANIM files to C or machinelanguage
source. You can of course use this source in your own programs (with
the intuition function DrawImage).
This program (IFF2SRC V1.0) is public domain but contributions and some
utilities are always welcome.
If you want to use this program for commercial purposes please write
for permission !
If you have any suggestions or remarks you can write to (Bug reports are
welcome too)
Jorrit Tyberghein
Hepmansbossen 31
2450 Meerhout BELGIUM
WARNING
-------
If you want to use this utility you must have AmigaDOS 2.0 (or later :-).
IFF2SRC is a workbench program but you can start it from CLI if you want.
Usage
-----
Double click on the IFF2SRC icon. If all goes well you should get the
IFF2SRC main window. You can drag and iconify this window with the usual
gadgets.
What do you see ?
In the topleft corner we have the 'Selected files' list. At this moment
it is probably empty. In this list are all the IFF files that you want
to convert to source. This is one of the nice features of this program:
You can select a lot of files and convert them all at once.
Files starting with an asterix ('*') are files that are excluded from
processing. This means that these files will not be converted to source
when you press 'Start' (the button to start converting). Files are
automatically excluded when they are converted with success.
You can exclude and include files by clicking on the name of the file
in this list (The asterix will toggle). (Selected files are also called
'marked files')
The file list is sorted by name.
Below the text 'Add file' is the string gadget used to add a file to
the 'Selected files' list. You can use wildcards in this gadget. If,
for example, you type 'sys:graphics/#?', all files in the
subdirectory graphics will be added to the file list. This is the first
method to add files to the file list.
(Note that .info files are not added to the file list).
Under the 'Add file' gadget is the 'Destination dir' gadget. If you
press 'Start', all files will be converted to this directory. They will
get the '.C' or '.ASM' extension.
If this stringgadget is empty (default), all files are converted to the
current directory.
Below this gadget are two cycle gadgets. With the 'Tabs' cycle gadget
you can set the tab size for the generated source. You can choose
between: 1 tab (in my editor tabs are equivalent to 2 spaces),
2 tabs (this is the default), 2 spaces or 4 spaces for each line.
With the 'Source' cycle gadget you can choose between C or
machinelanguage.
With the 'Compress' checkbox you can enable data compressing. This is
not very spectacular. Instead of writing everything in hexadecimal,
everything is written in decimal. This decreases the output source
file size.
To the right in this window are 8 buttons:
- 'Add'
This is the second way to add a file to the file list.
When you press this button you get the standard file requester.
You can select your file in this requester. When you have done
this, the file will appear in the file list.
Maybe a strange feature, but you can also use wildcards in this
filerequester: When you are walking through the subdirectories
you can suddenly decide that you want to convert all files in
the current directory. Simple type '#?' in the filename gadget,
and all files will be added.
- 'Info'
This button gives you information for all files that are not
excluded (are not marked with a '*'). The 'info' window is
explained below.
- 'Start'
This button actually does it. All files that are not excluded are
converted to C or assembler. Don't forget to set your destination
directory. If the 'Destination dir' gadget is empty, all files
will be converted to the current directory.
Note that IFF2SRC will convert IFF ILBM files with a BMHD and a
BODY chunk. If there is a CMAP chunk, IFF2SRC will use it to
generate some extra source (the ColorMap).
If the IFF file is an ANIM, IFF2SRC will convert the first
picture in this ANIM file.
IFF2SRC correctly interpretes masks (like stencils from DPaint)
and writes source for it as well.
- 'Mark'
This button marks all files. All files in the 'selected file
list' are then excluded and will not take part in actions like
'Start' and 'Info'.
- 'Unmark'
This button unmarks (includes) all files.
- 'Clr mrk' (Clear marked)
This button removes all files (from the file list) that are
marked.
- 'Clear'
This button removes all files from the file list.
- 'Abort'
This button is ghosted (unavailable) by default. When you select
an action (like 'Start','Info','Add',...) you can abort the
action with this button.
Note that if you try to abort the converting action ('Start'),
IFF2SRC will first continue the current file before aborting.
There is still a third way to add files to the file list:
You can select a bunch of icons and drop them into the IFF2SRC main
window.
When you have choosen 'Info' in the main window, you get the following
'Info Window' window for each not-excluded file:
What do you see ?
Information like the filename and path. The Width, Height and
Depth (number of planes) of the image.
At the right of this window you can see a small version of the IFF file.
Because the workbench only has 2 bitplanes (by default), you only see
two bitplanes of this picture. You can choose the bitplanes that you
want to see with the cycle gadgets above the 'Stop' and 'Okay' gadgets.
There are as many cycle gadgets as there are bitplanes in the workbench
(if you select more bitplanes with preferences you will get more cycle
gadgets). However, if the picture has less bitplanes than the
workbench, you will see as many cycle gadgets as there are bitplanes
in the picture.
Thus, one cycle gadget corresponds with one bitplane for the workbench.
Each cycle gadget can have values between 0 and the number of picture
bitplanes minus one. For example, if the first cycle gadget has value 3
and the second cycle gadget has value 2, then bitplane 3 and bitplane 2
from the picture are copied to the workbench bitplanes 0 and 1.
You can increase the values for these cycle gadget by clicking on them.
To decrease the values press shift and click on them.
If you are not sure that you understand this rather clumsy explanation
you can experiment with 'TestBrush'. This brush is so constructed that
you can always read which planes are on.
'Stop' gadget. When you press this gadget 'Info' will be aborted. He
will not even go to the next file. It is equivalent to pressing 'Abort'
in the main window and pressing 'Okay' in this window, but this is
rather clumsy.
'Okay' gadget. Use this button when you have seen the information and
you want to go to the next not-excluded file (if there is one).
Requesters.
When something goes wrong you get a requester. Some requesters only
have one gadget. You have no choice but to press that gadget.
There are requesters, however, with two gadgets: 'Stop' and 'Continue'.
These requesters can occur after you press the 'Start' or the 'Info'
button. Pressing 'Stop' causes the current action to completely abort
(just like the 'Stop' button in the 'Info window'). If you press
'Continue', IFF2SRC will stop processing the current file and proceed
with the next not-excluded file.
==============================================================================
End of IFF2SRC 1.0 document
==============================================================================